package com.sgolub.commanndsonline.service.entity;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sgolub.commanndsonline.dao.entity.ProxyAdvertisingRegistryDAO;
import com.sgolub.commanndsonline.domain.proxy.ProxyAdvertisingRegistry;

@Service
public class ProxyAdvertisingRegistryServiceImpl implements ProxyAdvertisingRegistryService {

	@Autowired
	private ProxyAdvertisingRegistryDAO dao;
	
	@Transactional
	public ProxyAdvertisingRegistry get(Integer id) {
		return dao.get(id);
	}

	@Transactional
	public ProxyAdvertisingRegistry	getItemByInventarNr(String inventarNr){
		return dao.getItemByInventarNr(inventarNr);
	}
	

	@Transactional
	public List<ProxyAdvertisingRegistry> list() {
		return dao.list();
	}

	@Transactional
	public List<ProxyAdvertisingRegistry> filter() {
		return dao.list();
	}

	@Transactional
	public List<ProxyAdvertisingRegistry> advansedListWithPaginationFlexGrid(int rp, String sortorder, int page, String query, String sortname, String qtype ) {
		return dao.advansedListWithPaginationFlexGrid(rp, sortorder, page, query, sortname, qtype);
	}
	
	@Transactional
	public List<ProxyAdvertisingRegistry> advansedListWithPaginationJQGrid(int rowsPerPage, int currentPage, String sortByColumn, String sortMode, HashMap<String, String> filtersMap) 
	{
		System.out.println("== ProxyAdvertisingRegistryServiceImpl.advansedListWithPaginationJQGrid ==");
		return dao.advansedListWithPaginationJQGrid(rowsPerPage, currentPage, sortByColumn, sortMode, filtersMap);
	}	
	
}
